﻿using PropertyChanged;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIA.Integration;
using VIA.SiMoJi.Domain.Inspection;

namespace VIA.SiMoJi.Domain.Option
{
    [AddINotifyPropertyChangedInterface]
    public class GongLiaoStationOption
    {
        public bool IsGoOn { get; set; }
        public double PiDaiHighSpeed { get; set; }
        public double PiDaiLowSpeed { get; set; }
    }

    [Serializable]
    public class GongLiaoRunningStatus : RunningStatus
    {
        /// <summary>
        /// 通知搬运机构料盘到位
        /// </summary>
        public bool IsFeedTrayReady { get; set; }
        /// <summary>
        /// 供料盘在籍
        /// </summary>
        public bool HasFeedTray { get; set; }
        /// <summary>
        /// 当前取料的列数
        /// </summary>
        public int CurrentFeedTrayCol { get; set; }
        /// <summary>
        /// 阻挡气缸1
        /// </summary>
        public CylinderStates CylinderResist1 { get; set; }
        /// <summary>
        /// 阻挡气缸2
        /// </summary>
        public CylinderStates CylinderResist2 { get; set; }
        /// <summary>
        /// 前后气缸1
        /// </summary>
        public CylinderStates CylinderFront1 { get; set; }
        /// <summary>
        /// 前后气缸2
        /// </summary>
        public CylinderStates CylinderFront2 { get; set; }
        /// <summary>
        /// 左右气缸1
        /// </summary>
        public CylinderStates CylinderLeftRight1 { get; set; }
        /// <summary>
        /// 左右气缸2
        /// </summary>
        public CylinderStates CylinderLeftRight2 { get; set; }
        /// <summary>
        /// 上下气缸1
        /// </summary>
        public CylinderStates CylinderTopBot1 { get; set; }
        /// <summary>
        /// 上下气缸2
        /// </summary>
        public CylinderStates CylinderTopBot2 { get; set; }
        /// <summary>
        /// 变距轴点位
        /// </summary>
        public double BJAxisPositions { get; set; }
        /// <summary>
        /// 顶升轴点位
        /// </summary>
        public double DSAxisPositions { get; set; }
        public GongLiaoRunningStatus() { }
        public GongLiaoRunningStatus(string name) { Name = name; }
        public GongLiaoRunningStatus Clone()
        {
            return new GongLiaoRunningStatus()
            {
                Name = this.Name,
                Step = this.Step,
                IsFeedTrayReady = this.IsFeedTrayReady,
                HasFeedTray = this.HasFeedTray,
                CurrentFeedTrayCol = this.CurrentFeedTrayCol,
                CylinderResist1 = this.CylinderResist1,
                CylinderResist2 = this.CylinderResist2,
                CylinderFront1 = this.CylinderFront1,
                CylinderFront2 = this.CylinderFront2,
                CylinderLeftRight1 = this.CylinderLeftRight1,
                CylinderLeftRight2 = this.CylinderLeftRight2,
                CylinderTopBot1 = this.CylinderTopBot1,
                CylinderTopBot2 = this.CylinderTopBot2,
                BJAxisPositions = this.BJAxisPositions,
                DSAxisPositions = this.DSAxisPositions,
            };
        }
    }
}
